split_match <- function(x, y) {
  x_split <- trimws(unlist(strsplit(x, split = " ")))
  y_split <- trimws(unlist(strsplit(y, split = " ")))
  return(if (all(x_split %in% y_split) &
             all(y_split %in% x_split)) {
    0L
  } else if (any(x_split %in% y_split) |
             any(y_split %in% x_split)) {
    9L
  } else {
    1L
  })
}